1. Field of the Invention
The present invention relates a class-D power amplifier and a triangular wave generator, and particularly to a class-D power amplifier and a triangular wave generator that are capable of reducing electromagnetic interference.
2. Description of the Prior Art
A class-D power amplifier is used for generating an output voltage according to an input signal and a triangular wave, where the output voltage is a pulse-width modulation voltage. Then, the output voltage is fed back to an input terminal of the class-D power amplifier through a feedback resistor, and filtered by a low-pass filter to generate an audio signal. Thus, a speaker can convert the audio signal into sound.
Please refer to FIG. 1A, FIG. 1B, and FIG. 1C. FIG. 1A is a diagram illustrating a triangular wave generated by a triangular wave generator, FIG. 1B is a diagram illustrating an output voltage outputted by a class-D power amplifier, and FIG. 1C is a diagram illustrating a fast Fourier transform (FFT) analysis being executed on the output voltage outputted by the class-D power amplifier. As shown in FIG. 1A and FIG. 1B, because a frequency of the triangular wave in the prior art is fixed, a frequency of the output voltage is also fixed. As shown in FIG. 1C, if the fast Fourier transform analysis is executed on the output voltage, a spectrogram in FIG. 1C may exhibit spikes. That is to say, the spectrogram in FIG. 1C may exhibit a fixed frequency and harmonics of the fixed frequency. Therefore, the spikes may interfere with an electronic device (e.g. a radio) if the spikes are just located on a band required by the electronic device.